import Vue from 'vue'
import VueRouter from 'vue-router'
import HmLogin from '@/views/HmLogin.vue'
import HmLayout from '@/views/HmLayout.vue'
import HmUser from '@/views/HmUser.vue'
import HmSetting from '@/views/HmSetting.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    component: HmLogin
  },
  {
    path: '/layout',
    component: HmLayout,
    children: [
      {
        path: '/layout/user',
        component: HmUser
      },
      {
        path: '/layout/setting',
        component: HmSetting
      }
    ]
  }
]

const router = new VueRouter({
  // mode: 'history',
  routes
})

export default router
